<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text">
</body>
</html>
<script>
    // 无防抖
    // let input = document.querySelector('input')
    // input.addEventListener('input',function (){
    //     console.log(this.value)
    // })
    // f防抖加入
    let timeID = null;
    document.querySelector('input').oninput=function (){
        clearTimeout(timeID)
        timeID= setTimeout(() => {
            console.log(`发送Ajax请求${this.value}`)
        },500)
    }

</script>
